package com.zealcomm.ivcscustomer.service;

import android.widget.RadioButton;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.zco.ivcs.customer.base.entity.BusinessScenariosBean;
import com.zealcomm.ivcscustomer.R;

import java.util.List;

public class ServiceListAdapter extends BaseQuickAdapter<BusinessScenariosBean.BusinessScenario, BaseViewHolder> {

    public ServiceListAdapter(int layoutResId, @Nullable List<BusinessScenariosBean.BusinessScenario> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, BusinessScenariosBean.BusinessScenario item){
        ((RadioButton)helper.getView(R.id.rb_skill)).setChecked(item.isSelected());
        ((TextView)helper.getView(R.id.rb_skill)).setText(item.getName());
    }
}
